<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <title>v-bind指令-属性绑定</title>
    <style>
        .class1 {
            background: #444;
            color: #eee;
        }
    </style>
</head>


<body>
    <div id='app'>
        <div v-bind:id='MenuContaineId'>
            <a href="#" v-bind:class="MenuClass">首页</a>
            <a href="#" v-bind:class="MenuClass">产品</a>
            <a href="#" v-bind:class="MenuClass">服务</a>
            <a href="#" v-bind:class="MenuClass">关于</a>
        </div>
    </div>
    <script>
        var a = new Vue({
            el: '#app',
            data: {
                MenuClass: 'top-menu',
                MenuContaineId: 'sitemenu',
            }
        });
    </script>
</body>

</html>